<div>
    <form nz-form>
        <nz-form-item>
            <nz-form-control [nzSm]="24" [nzXs]="24">
                <nz-alert nzType="error" [nzMessage]="message" nzDescription="{{'alert.truncate'|translate}}">
                    <ng-template #message>
                        <nz-tag [nzColor]="'#f50'">{{'common.no_rollback'|translate}}</nz-tag>
                    </ng-template>
                </nz-alert>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24">{{'common.database'|translate}}</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <nz-tag [nzColor]="'#2db7f5'">{{database}}</nz-tag>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24">{{'common.table'|translate}}</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <nz-tag [nzColor]="'#2db7f5'">{{value}}</nz-tag>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24">{{'common.partition'|translate}}</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <nz-select [(ngModel)]="partition" name="partition" (ngModelChange)="handlerValidate()">
                    <nz-option *ngFor="let item of partitions" nzValue="{{item.partition}}"
                        nzLabel="{{item.partition}}">
                    </nz-option>
                </nz-select>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzTooltipTitle="{{'tooltip.property.final'|translate}}">
                {{'common.final'|translate}}</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <nz-switch [(ngModel)]="final" name="final"></nz-switch>
            </nz-form-control>
        </nz-form-item>
    </form>
</div>
<div class="ant-modal-footer" style="padding: 10px;margin-bottom: -20px;margin-top: 20px;">
    <div class="ng-star-inserted">
        <button nz-button nzType="primary" nzDanger [disabled]="disabled.button" [nzLoading]="loading.button"
            (click)="handlerOptimize()">
            <span>{{'common.optimize'|translate}}</span>
        </button>
    </div>
</div>